New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc tiny changes #6046
Misc tiny changes #6046
Conversation
The result is the same but clear [1] has slightly less code than resize [2] and signals better the intent IMHO. [1] https://github.com/gcc-mirror/gcc/blob/fb7fb646fa1631f429dcca7201f4a1a77f876667/libstdc%2B%2B-v3/include/bits/stl_vector.h#L1495 [2] https://github.com/gcc-mirror/gcc/blob/fb7fb646fa1631f429dcca7201f4a1a77f876667/libstdc%2B%2B-v3/include/bits/stl_vector.h#L934
…ind_last_of Recommendation from Clang-Tidy: https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html
@@ -207,7 +207,7 @@ namespace vk | |||
{ | |||
if (!g_scratch_buffer) | |||
{ | |||
// 32M disposable scratch memory | |||
// 128M disposable scratch memory | |||
g_scratch_buffer = std::make_unique<vk::buffer>(*g_current_renderer, 128 * 0x100000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kd-11 Can you confirm the value to set in the comment is 128 to match with the buffer's size (128 * 0x100000)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, didn't change the comment when updating.
No description provided.